<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>

    var nums = [11,20,55,100,88,32]

    // 过滤所有的偶数,映射所有的偶数的平方,并且计算他们的和
    result = nums.filter(item => item % 2 === 0)
                  .map(item=>item**2)
                  .reduce((pre,item)=>pre+item,0)
    console.log(result);
    
  </script>
</body>
</html>